package com.chushouya.controller.manager.api;

import com.chushouya.common.annotations.AuthSkip;
import com.chushouya.common.constant.ServiceType;
import com.general.framework.core.schema.Response;
import com.chushouya.manager.dto.api.kefu.ReceiveDTO;
import com.chushouya.manager.service.api.KefuApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 首页数据接口控制器
 * 提供首页聚合数据查询功能
 * 
 * @author chushouya
 */
@Api(tags = ServiceType.API + "客服接口数据")
@RestController
@RequestMapping(ServiceType.API + "/kefu")
public class KefuApiController {
    
    @Resource
    private KefuApiService kefuApiService;

    @AuthSkip
    @ApiOperation("获取接待客服数据")
    @GetMapping("/receive")
    public Response<ReceiveDTO> homeData() {
        ReceiveDTO receiveDTO = kefuApiService.kefuReceive();
        return Response.success(receiveDTO);
    }

}
